/*
 * Created on 5 juil. 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package fr.jade.service.fm.repairScheduler;

import fr.jade.event.Event;
import fr.jade.util.JadeException;

/**
 * @author ssicard
 *
 */
public class SequentialScheduler extends AbstractScheduler{
	
	
	public void handleEvent(Event e) throws JadeException {
		new RepairTask(e).start();
	}
	private class RepairTask extends Thread {
		private Event e;
		
		public RepairTask(Event e){
			this.e = e;
		}
		
		public void run(){
			synchronized(RepairTask.class){
				try{
					log("*** BEGIN RECOVERY ***");
					eventOut.handleEvent(e);
					log("*** END RECOVERY ***");
				}catch( Exception e){
					log("FATAL ERROR IN RECOVERY");
					log(e);
				}
			}
		}
	}
}
